package com.ymatou.iapi.trading.operate2.parameter.enums;

import java.math.BigDecimal;

/**
 * 退款相关订单金额
 *
 */
public class OrderRefundAmounts {

	private static final long serialVersionUID = 3030254244873178911L;

	/**
	 * 已支付金额
	 */
	private BigDecimal paidAmount = BigDecimal.ZERO;

	/**
	 * 用余额支付的金额
	 */
	private BigDecimal paidAmountOfAccount = BigDecimal.ZERO;

	/**
	 * 第三方支付金额
	 */
	private BigDecimal paidAmountOfThirdParty = BigDecimal.ZERO;

	/**
	 * 余额支付部分已退金额
	 */
	private BigDecimal refundAmountOfAccountPay = BigDecimal.ZERO;

	/**
	 * 第三方支付部分已退金额
	 */
	private BigDecimal refundAmountOfThirdParty = BigDecimal.ZERO;

	/**
	 * 已退总金额
	 */
	private BigDecimal refundedAmount = BigDecimal.ZERO;

	/**
	 * 第三方支付优惠金额
	 */
	private BigDecimal discountOfThirdParty = BigDecimal.ZERO;

	/**
	 * 已退第三方支付优惠金额
	 */
	private BigDecimal refundedDiscountOfThirdParty = BigDecimal.ZERO;

	/**
	 * 剩余可退金额
	 * 
	 * @return
	 */
	public BigDecimal getRefundableAmount() {
		return paidAmount.subtract(refundedAmount);
	}

	/**
	 * 余额支付部分剩余可退金额
	 * 
	 * @return
	 */
	public BigDecimal getRefundableAmountFromAccountPay() {
		return paidAmountOfAccount.subtract(refundAmountOfAccountPay);
	}

	/**
	 * 第三方支付部分剩余可退金额
	 * 
	 * @return
	 */
	public BigDecimal getRefundableAmountFromThirdParty() {
		return paidAmountOfThirdParty.subtract(refundAmountOfThirdParty);
	}

	public BigDecimal getPaidAmount() {
		return paidAmount;
	}

	public void setPaidAmount(BigDecimal paidAmount) {
		this.paidAmount = paidAmount;
	}

	public BigDecimal getPaidAmountOfAccount() {
		return paidAmountOfAccount;
	}

	public void setPaidAmountOfAccount(BigDecimal paidAmountOfAccount) {
		this.paidAmountOfAccount = paidAmountOfAccount;
	}

	public BigDecimal getPaidAmountOfThirdParty() {
		return paidAmountOfThirdParty;
	}

	public void setPaidAmountOfThirdParty(BigDecimal paidAmountOfThirdParty) {
		this.paidAmountOfThirdParty = paidAmountOfThirdParty;
	}

	public BigDecimal getRefundAmountOfThirdParty() {
		return refundAmountOfThirdParty;
	}

	public void setRefundAmountOfThirdParty(BigDecimal refundAmountOfThirdParty) {
		this.refundAmountOfThirdParty = refundAmountOfThirdParty;
	}

	public BigDecimal getRefundAmountOfAccountPay() {
		return refundAmountOfAccountPay;
	}

	public void setRefundAmountOfAccountPay(BigDecimal refundAmountOfAccountPay) {
		this.refundAmountOfAccountPay = refundAmountOfAccountPay;
	}

	public BigDecimal getRefundedAmount() {
		return refundedAmount;
	}

	public void setRefundedAmount(BigDecimal refundedAmount) {
		this.refundedAmount = refundedAmount;
	}

	public BigDecimal getDiscountOfThirdParty() {
		return discountOfThirdParty;
	}

	public void setDiscountOfThirdParty(BigDecimal discountOfThirdParty) {
		this.discountOfThirdParty = discountOfThirdParty;
	}

	public BigDecimal getRefundedDiscountOfThirdParty() {
		return refundedDiscountOfThirdParty;
	}

	public void setRefundedDiscountOfThirdParty(
			BigDecimal refundedDiscountOfThirdParty) {
		this.refundedDiscountOfThirdParty = refundedDiscountOfThirdParty;
	}
}
